1. Field of the Invention
The present invention relates to a time-out processing apparatus and method for a SCSI system wherein a target and a plurality of initiators are connected to each other by a SCSI bus, and more particularly to a time-out processing apparatus and method wherein a time-out time for each initiator stored in a target is updated.
2. Description of the Related Art
Data transfer of an interface according to the SCSI standards is performed making use of a REQ (Request) signal and an ACK (Acknowledge) signal as control signals. In particular, an initiator responds with an ACK signal to a transfer request in the form of a REQ signal from a target (this is called REQ/ACK handshake) to perform data transfer. Data transfer is performed in one of an asynchronous mode and a synchronous mode which are different in a method of signaling a REQ signal and responding with an ACK signal. Whichever one of the asynchronous mode and the synchronous mode is used for transfer, an initiator responds to REQ signals signaled from a target with an equal number of ACT signals.
If the numbers of REQ signals and ACK signals become incoincident with each other because of noise to a SCSI bus or some other cause while data transfer is proceeding between a certain initiator and a target during data transfer over the REQ/ACK handshake, then the data transfer is not completed. Consequently, the other initiators cannot perform data transfer with the target.
In order to prevent occurrence of such a situation as just described, it is a popular practice to provide an initiator and a target with a function of determining that, when REQ/ACK handshake is not completed in a certain time, this is a time-out of the data transfer and releasing the bus. Here, two cases are available including a case wherein the initiator detects a time-out earlier than the target and issues a SCSI bus reset to release the bus and another case wherein the target detects a time-out earlier than the initiator and enters a bus-free phase to release the bus. Where operation in a multi-initiator environment wherein a plurality of initiators are connected is taken into consideration, since the transition into a bus-free phase by the target has a narrower range of influence than the resetting of the SCSI bus which cancels all commands and has an influence on the entire system, generally the time-out time of the target should be set shorter than the time-out times of the initiators so that the target may detect a time-out earlier than the initiators.
Here, the time-out time of each initiator is determined taking, for example, a data transfer rate of the initiator, a maximum size of transfer data and some other suitable parameters and is longer by several seconds than transfer time required for data of the maximum data size. In particular, if the time-out time is set shorter than the transfer time of maximum size data, then there is the possibility that the bus may be released while data transfer is proceeding normally. On the contrary, if the time-out time is set excessively long, then such a situation occurs that the bus is not released for a long time although data transfer fails because of noise or from some other cause. It is to be noted that, if the time-out time of the target is set shorter so that the bus may be released by the target before the initiator detects its time-out, then the initiator need not issue a SCSI bus reset (because the fact that the bus is released signifies that data transfer has come to an end irregularly).
Usually, a target has a fixed time-out time. Therefore, if the set time-out time is excessively short, then irregular ending occurs frequently, but if the set time-out time is excessively long, then a bus reset by an initiator occurs. In order to solve the problem just described, it is a possible method that a system manager sets the time-out time by a manual operation. This method, however, is disadvantageous in that the burden to the system manager is heavy.
Meanwhile, Japanese Patent Laid-Open No. 293856/1991 discloses an apparatus wherein each initiator issues a time-out setting command to a target and the target sets time-out times for the individual initiators. With the apparatus, the time-out times of the initiators can be set in the target without a burden to a system manager.
The apparatus disclosed in the document mentioned above, however, is disadvantageous in that, since it is necessary to provide all initiators connected to a SCSI bus with a function of issuing a time-out time setting command which is a novel command, considerable re-construction of the system is required. Further, depending upon a computer employed for an initiator, such re-construction may possibly be impossible.
It is an object of the present invention to provide a time-out processing method and apparatus for a SCSI system by which an appropriate time-out time for each initiator can be set in a target without the necessity for considerable re-construction of the system and without imposing a burden to a system manager.
In order to attain the object described above, according to an aspect of the present invention, there is provided a time-out processing method for a SCSI system wherein, when an elapsed time after a target, which is connected to a plurality of initiators by a SCSI bus and has a time-out time storage section for storing time-out times individually for the initiators, starts data transfer with any of the initiators exceeds the time-out time for the initiator stored in the time-out time storage section before the data transfer is completed, the target performs time-out processing to release the SCSI bus, comprising a step performed by the target of updating, when a SCSI bus reset is received from any of the initiators before data transfer with the initiator is completed after the data transfer is started, the time-out time for the initiator stored in the time-out time storage section based on an elapsed time before the SCSI bus reset is received after the data transfer is started, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
According to another aspect of the present invention, there is provided a time-out processing method for a SCSI system wherein, when an elapsed time after a target, which is connected to a plurality of initiators by a SCSI bus and has a time-out time storage section for storing time-out times individually for the initiators, starts data transfer with any of the initiators exceeds the time-out time for the initiator stored in the time-out time storage section before the data transfer is completed, the target performs time-out processing to release the SCSI bus, comprising a data transfer starting time fetching step performed by the target of fetching a data transfer stating time at which data transfer with any of the initiators is started, an elapsed time calculation step of calculating an elapsed time after the data transfer is started based on the data transfer starting time fetched in the data transfer starting time fetching step and a current time, and a time-out time updating step of updating, when a SCSI bus reset is received from the initiator before the data transfer is completed after the data transfer with the initiator is started, the time-out time for the initiator stored in the time-out time storage section based on the elapsed time calculated in the elapsed time calculation step, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
According to a further aspect of the present invention, there is provided a time-out processing apparatus for a SCSI system wherein, when an elapsed time after a target, which is connected to a plurality of initiators by a SCSI bus and has a time-out time storage section for storing time-out times individually for the initiators, starts data transfer with any of the initiators exceeds the time-out time for the initiator stored in the time-out time storage section before the data transfer is completed, the target performs time-out processing to release the SCSI bus, comprising time-out time updating means provided in the target for updating, when a SCSI bus reset is received from any of the initiators before data transfer with the initiator is completed after the data transfer is started, the time-out time for the initiator stored in the time-out time storage section based on an elapsed time before the SCSI bus reset is received after the data transfer is started, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
According to a still further aspect of the present invention, there is provided a time-out processing apparatus for a SCSI system wherein, when an elapsed time after a target, which is connected to a plurality of initiators by a SCSI bus and has a time-out time storage section for storing time-out times individually for the initiators, starts data transfer with any of the initiators exceeds the time-out time for the initiator stored in the time-out time storage section before the data transfer is completed, the target performs time-out processing to release the SCSI bus, comprising data transfer starting time fetching means provided in the target for fetching a data transfer stating time at which data transfer with any of the initiators is started, elapsed time calculation means provided in the target for calculating an elapsed time after the data transfer is started based on the data transfer starting time fetched by the data transfer starting time fetching means and a current time, and time-out time updating means provided in the target for updating, when a SCSI bus reset is received from the initiator before the data transfer is completed after the data transfer with the initiator is started, the time-out time for the initiator stored in the time-out time storage section based on the elapsed time calculated by the elapsed time calculation means, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
In the time-out processing apparatus just described, data transfer starting time fetching means fetches a data transfer stating time at which data transfer with any of the initiators is started, and the elapsed time calculation means calculates an elapsed time after the data transfer is started based on the data transfer starting time fetched by the data transfer starting time fetching means and a current time. Then, the time-out time updating means updates, when a SCSI bus reset is received from the initiator before the data transfer is completed after the data transfer with the initiator is started, the time-out time for the initiator stored in the time-out time storage section based on the elapsed time calculated by the elapsed time calculation means, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
According to a yet further aspect of the present invention, there is provided a recording medium which has recorded thereon a program which causes a target, which has a time-out time storage section for storing time-out times individually for a plurality of initiators connected thereto by a SCSI bus and performs, when an elapsed time after the target starts data transfer with any of the initiators exceeds the time-out time for the initiator stored in the time-out time storage section before the data transfer is completed, time-out processing to release the SCSI bus, to have functions as data transfer starting time fetching means provided in the target for fetching a data transfer stating time at which data transfer with any of the initiators is started, elapsed time calculation means provided in the target for calculating an elapsed time after the data transfer is started based on the data transfer starting time fetched by the data transfer starting time fetching means and a current time, and time-out time updating means provided in the target for updating, when a SCSI bus reset is received from the initiator before the data transfer is completed after the data transfer with the initiator is started, the time-out time for the initiator stored in the time-out time storage section based on the elapsed time calculated by the elapsed time calculation means, a processing time required for the time-out processing and a time estimated to require for the initiator to issue a SCSI bus reset after the initiator detects its time-out.
With the time-out processing methods and apparatus and the recording medium, the time-out time for each of the initiators is set in the target making use of such a function of issuing a SCSI bus reset when a time-out occurs as is usually provided in an initiator. Consequently, an appropriate time-out time for each initiator can be automatically set in the target without the necessity for considerable re-construction of the system such as re-construction of all initiators and without imposing a burden to a system manager.
The above and other objects, features and advantages of the present invention will become apparent from the following description and the appended claims, taken in conjunction with the accompanying drawings in which like parts or elements are denoted by like reference symbols.